/**
 * 
 */
package com.sci.web.action.eninfomanager;

import javax.annotation.Resource;

import com.sci.web.action.util.BaseAction;
import com.sci.web.dao.EnterpriseInfoManageDao;

/**
 * @author BaiFuyou
 * @date: Oct 30, 2011 11:15:24 PM
 * 
 * 把用户密码更新成默认的密码666666
 */
public class UpdateUserPasswordAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6666312039007594205L;
	@Resource
	private EnterpriseInfoManageDao enterpriseInfoManageDao;
	private int userId;

	/**
	 * @return the userId
	 */
	public int getUserId() {
		return userId;
	}

	/**
	 * @param userId
	 *            the userId to set
	 */
	public void setUserId(int userId) {
		this.userId = userId;
	}

	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		super.setContentType(super.JSON);
		if (enterpriseInfoManageDao.updateUserPassword(userId)) {
			super.outPrint("ok");
		} else {
			super.outPrint("fail");
		}
		return "json";
	}
}
